<h2>Problem 292</h2>
<div style="color:#666;font-size:80%;">15 May 2010</div><br />
<div class="problem_content">
<p>We shall define a <i>pythagorean polygon</i>  to be a <b>convex polygon</b> with the following properties:<br />
<ul>
<li>there are at least three vertices,</li>
<li>no three vertices are aligned,</li>
<li>each vertex has <b>integer coordinates</b>,</li>
<li>each edge has <b>integer length</b>.</li></ul></p>


<p>For a given integer <var>n</var>, define P(<var>n</var>) as the number of distinct pythagorean polygons for which the perimeter is <img src='images/symbol_le.gif' width='10' height='12' alt='&le;' border='0' style='vertical-align:middle;' />&thinsp;<var>n</var>.<br />
Pythagorean polygons should be considered distinct as long as none is a translation of another.</p>

<p>You are given that P(4)&thinsp;=&thinsp;1, P(30)&thinsp;=&thinsp;3655 and P(60)&thinsp;=&thinsp;891045.<br />
Find P(120).</p>
</div><br />
